/**
 * Copyright ©2012-2018 HopeHaiyang Corporation, All Rights Reserved
 * http://www.wuhanhope.com
 */
package hope.platform.data.server.event.img;

import hope.platform.data.domain.Warning;
import hope.platform.data.event.WarningEvent;
import hope.platform.data.server.event.header.WarningListenerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;

/**
 * class info
 *
 * @author hujia
 *         Create at 2018/7/24 16:48
 */
@Service
public class WarningListenerServiceImg implements WarningListenerService {

    @Autowired
    private ApplicationContext applicationContext;

    @Override
    public void publish(Warning warning) {
        applicationContext.publishEvent(new WarningEvent(this, warning));
    }
}
